package com.SocketDemo.UDPSocketDemo;

import java.io.IOException;
import java.net.*;

/**
 * @Author milian
 * @Date 2021/7/31 0031 17:21
 */
public class clientDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        byte[] bytes  = "hello world".getBytes();
        DatagramPacket dp = new DatagramPacket(bytes, bytes.length, InetAddress.getByName("127.0.0.1"), 10086);
        ds.send(dp);
    }
}
